<?php
/**
 * Created by PhpStorm.
 * User: xiaofeng
 * motto: 现在的努力是为了小时候吹过的牛逼！
 * Date: 2020/9/13
 * Time: 12:03
 */
namespace app\api\controller;
class Logout extends AuthBase{
    public function index(){
        // 删除redis token缓存
        $res = cache(config("redis.token_pre").$this->accessToken,null);
        if ($res){
            return show(config("status.success"),"退出登录成功");
        }
        return show(config("status.error"),"退出登录失败");

    }
}
